import { createRouter, createWebHashHistory } from 'vue-router';
import routes from './routes';

export default createRouter({
    routes,
    history: createWebHashHistory(),
    scrollBehavior(to, from, savedPosition) {
        // 自定义路由跳转时页面滚动的位置
        if (savedPosition)
            return savedPosition;
        else
            return { top: 0 };
    },
});
